import { flysel } from "../plugin/flysel.js"
export function upDate() {
    const date = new Date
    const month = date.getMonth() + 1
    const day = date.getDate()
    /**@type {HTMLCanvasElement} */
    const cvs = flysel('#cvs').e
    const ctx = cvs.getContext('2d')
    ctx.drawImage(flysel('#PHN2ZyB4').e, 0, 0)
    ctx.font = '150px "fc-number"'
    ctx.textAlign = 'center'
    ctx.textBaseline = 'middle'
    ctx.fillStyle = '#ffffff'
    ctx.fillText(month, 116, 116)
    ctx.font = '350px fc-number'
    ctx.globalCompositeOperation = 'destination-out'
    ctx.fillText(day, 315, 365)
}
if (document.fonts.check('16px fc-number')) {
    upDate()
} else {
    document.fonts.ready.then(() => {
        upDate()
    })
}
